import axios from "~/axios";

export function getfoodlist(page, per_page, searchname, category_id) {
    return axios.post("/getfoodlist", { page, per_page, searchname, category_id })
}

export function getfooddetail(id) {
    return axios.post("/getfooddetail", { id })
}
export function postcomment(ids, target_type, content, user_id) {
    return axios.post("/postcomment", { ids, target_type, content, user_id })
}
export function getcomment(ids, target_type, page, perPage) {
    return axios.post("/getcomment", { ids, target_type, page, perPage })
}
export function deletecomment(id) {
    return axios.post("/deletecomment", { id })
}
export function postscore(user_id, ids, target_type, score) {
    return axios.post("/postscore", { user_id, ids, target_type, score })
}
export function getscore(ids, user_id, target_type) {
    return axios.post("/getscore", { ids, user_id, target_type })
}
export function postcollect(user_id, ids, target_type) {
    return axios.post("/postcollect", { user_id, ids, target_type })
}
export function getcollect(ids, user_id, target_type) {
    return axios.post("/getcollect", { ids, user_id, target_type })
}
export function detalecollect(user_id, ids, target_type) {
    return axios.post("/detalecollect", { user_id, ids, target_type })
}
